package com.aspose.cells;

public class zxz {
   static char[] a = new char[0];
   private static int[] b = new int[]{a(true, 0, '#')};
   private int c = 7;
   private char[] d;
   private Color e;
   private boolean f;
   private int[] g;

   public zxz() {
      this.d = a;
      this.e = Color.getEmpty();
      this.f = false;
   }

   void a() {
      this.c = 7;
      this.d = a;
      this.e = Color.getEmpty();
      this.f = false;
      this.g = null;
   }

   public boolean b() {
      return this.d.length < 1 && this.g == null;
   }

   public boolean c() {
      return this.d.length < 1;
   }

   void d() {
      this.c = 1;
      this.d = a;
   }

   public boolean e() {
      return this.f;
   }

   void a(char var1) {
      this.f = true;
      this.d();
      if (var1 == '#') {
         this.g = b;
      } else {
         this.g = new int[]{a(true, 0, var1)};
      }

   }

   public int f() {
      return this.c;
   }

   public char[] g() {
      return this.d;
   }

   public String h() {
      return this.d.length < 1 ? "" : new String(this.d);
   }

   void a(int var1, String var2) {
      this.c = var1;
      this.d = var2.toCharArray();
   }

   void a(int var1, char[] var2) {
      this.c = var1;
      this.d = var2;
   }

   public String a(int var1, boolean var2) {
      return this.g == null ? this.h() : new String(this.b(var1, var2));
   }

   public char[] b(int var1, boolean var2) {
      if (this.g == null) {
         return this.d;
      } else {
         if (var1 < 0) {
            var1 = 0;
         }

         int var3 = 0;

         for(int var4 = 0; var4 < this.g.length; ++var4) {
            if (this.a(var4)) {
               ++var3;
            }
         }

         char[] var13 = new char[this.d.length + (var3 > 0 ? this.g.length - var3 + var1 : this.g.length)];
         int var5 = var13.length;
         int var6 = this.d.length;
         boolean var7 = false;
         if (var1 < 1) {
            var3 = 0;
         }

         for(int var8 = this.g.length - 1; var8 > -1; --var8) {
            var7 = false;
            if (this.a(var8)) {
               if (var3 < 1) {
                  continue;
               }

               var3 = 0;
               var7 = true;
            }

            int var9 = this.b(var8);
            int var10 = var6 - var9;
            if (var10 > 0) {
               System.arraycopy(this.d, var9, var13, var5 - var10, var10);
            }

            var6 = var9;
            var5 -= var10;
            if (var7) {
               char var11 = this.c(var8);

               for(int var12 = 0; var12 < var1; ++var12) {
                  --var5;
                  var13[var5] = var11;
               }
            } else {
               --var5;
               var13[var5] = var2 ? 32 : this.c(var8);
            }
         }

         if (var6 > 0) {
            System.arraycopy(this.d, 0, var13, 0, var6);
         }

         return var13;
      }
   }

   void a(Color var1) {
      this.e = var1;
   }

   void a(int[] var1) {
      this.g = var1;
   }

   int[] i() {
      return this.g;
   }

   public int j() {
      return this.g == null ? 0 : this.g.length;
   }

   public boolean a(int var1) {
      return ((long)this.g[var1] & 2147483648L) != 0L;
   }

   public int b(int var1) {
      return (this.g[var1] & 2147418112) >> 16;
   }

   void a(int var1, int var2) {
      this.g[var1] &= -2147418113;
      this.g[var1] |= var2 << 16;
   }

   public char c(int var1) {
      return (char)(this.g[var1] & '\uffff');
   }

   static int a(boolean var0, int var1, char var2) {
      int var3 = var0 ? Integer.MIN_VALUE : 0;
      var3 |= var1 << 16;
      var3 |= var2;
      return var3;
   }
}
